package org.example.springbootmodule.controller;

import org.example.springbootmodule.entity.User;
import org.example.springbootmodule.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {

    @Autowired
    UserService userService;
    @GetMapping("/hello")
    public List<User> getUser(){
        return  userService.getUsers();
    }
}
